const Service = require('egg').Service;


class UserService extends Service {
    async list() {
        const list = await this.app.mysql.select('users');
        return { list };
    }
    
    
    async login(user) {
        const res = await this.app.mysql.get(
            'users', {
                name: user.username,
                pwd: user.password
            }
        );
        return { res };
    }
}

module.exports = UserService;